home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / graphicgems4.lha / GemsIV / vec_mat / ray / Object3D.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-06  |  780 b   |  33 lines

  1. /************************************************************************
  2. *                                    *
  3. * CLASS: Object3D                            *
  4. * AUTHOR: Jean-Francois DOUE                        *
  5. * LAST MODIFICATION: 12 Oct 1993                    *
  6. *                                    *
  7. * This class is an abstract root class for all the 3D objects.        *
  8. * It stores the position an the orientation of the object        *
  9. *                                    *
  10. ************************************************************************/
  11.  
  12. #ifndef Object3D_h
  13. #define Object3D_h 1
  14. #include "algebra3.h"
  15.  
  16. class Object3D
  17. {
  18. protected:
  19.  vec3    pos;
  20.  mat4    orient;
  21.  
  22. public:
  23.  
  24.  void setPosition(vec3& p) { pos = p; };
  25.  vec3 position() { return pos; };
  26.  void setOrientation(mat4& o) { orient = o; };
  27.  mat4 orientation() { return orient; };
  28.  
  29.  // friends
  30.  friend istream& operator >> (istream& s, Object3D& a);
  31. };
  32.  
  33. #endif